import { IsString, IsNotEmpty, IsBoolean, IsOptional, IsNumber } from 'class-validator';
import { ApiProperty } from '@nestjs/swagger';
import { Type } from 'class-transformer';

export class CreateChatDto {
  @IsString()
  @IsNotEmpty({ message: '消息内容不能为空' })
  message: string;

  @IsBoolean()
  @IsOptional()
  stream?: boolean = false;

  @IsNotEmpty({ message: '会话ID不能为空' })
  @IsNumber()
  sessionId?: number;

  @IsNotEmpty({ message: '是小孩嘛' })
  @IsNumber()
  isChild?: number;
}
